
/*[精细度]*/
$fn=100;

/*[物体长宽高]*/
box_length=167;
box_width=88;
box_height=57;

/*[支架腿尺寸]*/
sup_width=3;
sup_length=10;
//腿间距
sup_dis=8;

/*[罩子壳尺寸]*/
shell_height=3;
shell_width=1.5;

w2=box_width+2*sup_width;
bl=sup_length + sup_dis;

difference(){
    minkowski(){
 linear_extrude(height=shell_height,scale=1.2) square([w2,box_length],center=true);
        sphere(1);
    }
     translate([0,0,shell_width])linear_extrude(height=shell_height,scale=1.24) square([w2,box_length],center=true);
}
//添加支架腿
sh=box_height+shell_height +5;
hsw=sup_width/2;
hbw=w2/2;
zp=shell_width+sh/2;
positions=[[hbw-hsw,bl,zp],[hsw-hbw,bl,zp],[hbw-hsw,-bl,zp],[hsw-hbw,-bl,zp]];
for(i = [0:3]){
    translate(positions[i]) cube([sup_width,sup_length,sh],center=true);
}
 